var express = require('express');
var router = express.Router();

var sysLoginModel = require('../CrawlerServer/models/SysLoginModel');

/* GET home page. */
router.get('/', function (req, res, next) {
    res.render('login',
        {
            title: '数据挖掘与分析 - 登陆',
            bodyClass:'login',
            css: ['media/css/login-soft.css'],
            js:['media/js/jquery.validate.min.js','media/js/jquery.backstretch.min.js','media/js/app.js','media/js/login-soft.js','javascripts/loginjs.js']
        }
    );
});
router.get('/loginIn', function (req, res, next) {
    res.render('page/index',
        {
            title: '数据挖掘与数据分析项目 首页',
            bodyClass:'page-header-fixed',
            layout:'main',
            result:'success',
            css:
                [
                    'media/css/jquery.gritter.css',
                    'media/css/daterangepicker.css',
                    'media/css/fullcalendar.css',
                    'media/css/jqvmap.css',
                    'media/css/jquery.easy-pie-chart.css'
                ],
            js:
                [
                    'media/js/jquery.vmap.js',
                    'media/js/jquery.vmap.russia.js',
                    'media/js/jquery.vmap.world.js',
                    'media/js/jquery.vmap.europe.js',
                    'media/js/jquery.vmap.germany.js',
                    'media/js/jquery.vmap.usa.js',
                    'media/js/jquery.vmap.sampledata.js',
                    'media/js/jquery.flot.js',
                    'media/js/jquery.flot.resize.js',
                    'media/js/jquery.pulsate.min.js',
                    'media/js/date.js',
                    'media/js/daterangepicker.js',
                    'media/js/jquery.gritter.js',
                    'media/js/fullcalendar.min.js',
                    'media/js/jquery.easy-pie-chart.js',
                    'media/js/jquery.sparkline.min.js',
                    'media/js/app.js',
                    'media/js/index.js'
                ]
        }
    );
});
router.post('/loginIn',sysLoginModel.loginIn);

module.exports = router;
